package com.zrrd.learn.chapter06数组;

/**
 * 汉字题2
 *
 * @author wrn
 * @version 1.0
 * @date 2023/7/14 20:13
 */

public class Chinese02 {

    /**
     * 打印出“甲“字
     */
    public static void question01(){
        System.out.println("\n1题打印出“甲”字\n");
        for (int i = 0; i < 11; i++) {
            for (int j = 0; j < 11; j++) {
                if (i==0||i==3||i==6||j==5||j==0&&i<7||j==10&&i<7){
                    System.out.print("* ");
                }else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }
    }

    /**
     * 打印出"由"字
     */
    public static void question02(){
        System.out.println("\n2题打印出“由”字\n");
        for (int i = 0; i < 11; i++) {
            for (int j = 0; j < 11; j++) {
                if (i==4||i==7||i==10||j==5||j==0&&i>3||j==10&&i>3){
                    System.out.print("* ");
                }else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }
    }

    /**
     * 打印出“高”字
     */
    public static void question03(){
        System.out.println("\n3题打印出“高”字\n");
        for (int i = 0; i < 13; i++) {
            for (int j = 0; j < 13; j++) {
                if (i==0&&j==5||i==1&&j==6||i==2||i==3&&j>2&&j<10||i==5&&j>2&&j<10||j==3&&i==4||
                        j==9&&i==4||j==0&&i>5||i==6||j==12&&i>5||i==8&&j>2&&j<10||i==10&&j>2&&j<10
                        ||j==3&&i==9||j==9&&i==9||i==11&&j==11){
                    System.out.print("* ");
                }else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        question03();
    }
}
